<template>
  <div>
    <div>
      <usercover :city="city"></usercover>
      <feed :list="indexList"></feed>
      <!--<release></release>-->
    </div>
  </div>
</template>

<script>
import feed from './components/Feed'
import usercover from './components/User-Cover'
import release from './components/Release'
import axios from 'axios'

export default {
  components: {
    usercover,
    feed,
    release
  },
  data () {
    return {
      city: '',
      indexList: []
    }
  },
  methods: {
    getHomeInfo () {
      axios.get('/api/group.json')
        .then(this.getHomeInfoSucc)
    },
    getHomeInfoSucc (res) {
      res = res.data
      if (res.ret && res.data) {
        const data = res.data
        this.city = data.city
        this.indexList = data.city
      }
    }
  },
  mounted () {
    this.getHomeInfo()
  }
}
</script>

<style>

</style>
